package jsonrmi;

import com.rmi.JsonRmi;
import java.net.InetAddress;
import java.util.List;
import jsonrmi.com.somelongpackage.packageone.SwingRmiHandler;

/**
 * @author Dmitry
 */
public class JsonRmiMainClass {
    private static final SwingRmiHandler handler = new SwingRmiHandler();

    public static void main(String[] args) throws Exception {
        /*
         SwingRmiHandler handler = JsonRmi.get().constructRmiObject(InetAddress.getLocalHost(), 8899, SwingRmiHandler.class, "someId.id");
         handler.print("kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk kjjjjjjjjjjjjjjjjjjjjjjjjjjjjj kljjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj kjlllllllliu liu lfi lrjlkrfj sdlfjkhsgfkdjhweroyusa kjfhskdfjhwsakthw t4sakdhf alkdtjh sgkjshdfgkiuwy5 34jh534 k6jh54 6k23h5 34k6hop 87 0wtjdhbgklwahr[epoqwiejr ntsnfc ksjhtwoi rthou75y32op5hi skjhvgesuoty whkrthuwevpt9  uhertljhwe354 6p890e7vw rtojherto38w97y5oushrtweujys59234 5hkj34h5tiwu7yr2oh5w3i4thrsome message");
         Thread.sleep(1000);
         */

        JsonRmi.get().initRmiServer(8899, false);
        JsonRmi.get().addRmiHandler(SwingRmiHandler.class, "someId.id", handler);
        SwingRmiHandler handler = JsonRmi.get().constructRmiObject(InetAddress.getLocalHost(), 8899, SwingRmiHandler.class, "someId.id");
        List<String> strings = handler.getValues();
        strings = null;
    }
}
